<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
	BillMonthIoSearchEvent event = (BillMonthIoSearchEvent)context.getSessionValue("BillMonthIoSearchEvent");
	ObjectList list = BillMonthIo.fetch().search(con,event);
    
    String monthDate = event.getMoneyDate();
    if(monthDate == null) monthDate = "";
    
    String year = "";
    String month = "";
    if(monthDate.length() >=  7){
        year = monthDate.substring(0, 4);
        month = monthDate.substring(5, 7);
    }
%>

<!--********************* Part3:JavaScript Code ***************-->
<!--start 客户端脚本区域-->
<script language=javascript>

var list_code = "listBillMonthIo";

function doSearch()
{

	//SetValue("s_Id",GetValue("i_Id")); //序号

	SetValue("s_WarehouseCode",GetValue("i_WarehouseCode")); //仓库编号

	//SetValue("s_WarehouseName",GetValue("i_WarehouseName")); //仓库名称

	SetValue("s_MoneyType",GetValue("i_MoneyType")); //费用类别

	//SetValue("s_MoneyIo",GetValue("i_MoneyIo")); //出入库金额标志

	//SetValue("s_Money",GetValue("i_Money")); //总金额

	SetValue("s_MoneyDate",GetValue("i_Year") + "-" + GetValue("i_Month")); //费用发生日期

	//SetValue("s_CreateUserId",GetValue("i_CreateUserId")); //创建人序号

	//SetValue("s_CreateUser",GetValue("i_CreateUser")); //创建人

	//SetValue("s_CreateTime",GetValue("i_CreateTime")); //创建时间
	

	SetValue("s_OrderField",GetValue("i_OrderField")); //排序
	SetValue("s_OrderDesc",getCheckBoxValues("i_OrderDesc")); //升降序
	doCommonSearch();
}

function bizViewBillMonthIo(id)
{
	viewWin("<%=Config.getSrv()%>?action_code=viewBillMonthIo&Id="+id);
}

function doDelete()
{
	if(!hasChooseRadio("ids"))
	{
		bizMessage("删除","其他费用");
		return false;
	}
	if(!bizConfirm("删除","其他费用")) return false;
	SetAction("deleteBillMonthIo");
	frm.submit();
}

function doToAdd()
{
	SetAction("toAddBillMonthIo");
	frm.submit();
}

function doToUpdate()
{
	if(!checkOne("ids")) 
	{
		bizMessage("修改","其他费用");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toUpdateBillMonthIo");
	frm.submit();
}
function doToCopy()
{
	if(!checkOne("ids")) 
	{
		bizMessage("复制","其他费用");
		return false;
	}
	SetValue("Id",getCheckBoxValue("ids"));
	SetAction("toCopyBillMonthIo");
	frm.submit();
}

key_InitDefault();
key_RegSubmitHandler(doSearch);
</script>


<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->
<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code" value="">
<input type=hidden name="Id" value="">
<input type=hidden name=sortOrder value="1">

<!--查询条件保留区域-->

<input type=hidden name="s_Id" value="<%=event.getId()%>"> <!--序号-->

<input type=hidden name="s_WarehouseCode" value="<%=event.getWarehouseCode()%>"> <!--仓库编号-->

<input type=hidden name="s_WarehouseName" value="<%=event.getWarehouseName()%>"> <!--仓库名称-->

<input type=hidden name="s_MoneyType" value="<%=event.getMoneyType()%>"> <!--费用类别-->

<input type=hidden name="s_MoneyIo" value="<%=event.getMoneyIo()%>"> <!--出入库金额标志-->

<input type=hidden name="s_Money" value="<%=event.getMoney()%>"> <!--总金额-->

<input type=hidden name="s_MoneyDate" value="<%=event.getMoneyDate()%>"> <!--费用发生日期-->

<input type=hidden name="s_CreateUserId" value="<%=event.getCreateUserId()%>"> <!--创建人序号-->

<input type=hidden name="s_CreateUser" value="<%=event.getCreateUser()%>"> <!--创建人-->

<input type=hidden name="s_CreateTime" value="<%=event.getCreateTime()%>"> <!--创建时间-->


<%@ include file="/framework/list_head.jsp"%>

<br>
<!--********************* Part5:Search Area ***************-->
<%=uiSearchStart%>>
<%
	int key_tab = 1;
%>


    <%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			所属仓库：<%=SelectManager.viewWarehouseSelect(con,loginInfo.getLoginWarehouseCode(),"i_WarehouseCode",event.viewWarehouseCode(),false,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		</td>		

        <%=uiSearchInputTDHead%>>
            费用发生日期：&nbsp;<%=SelectManager.viewYearSelect(con,"i_Year",year,true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%>  <%=SelectManager.viewMonthSelect(con,"i_Month",month,true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%>
        </td>       
    </tr>

	<%=uiSearchInputTR%>>
		<%=uiSearchInputTDHead%>>
			费用类别：<%=SelectManager.viewOtherMoneyType("i_MoneyType",event.viewMoneyType(),true,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%>
		</td>		

		<%=uiSearchInputTDHead%>>
			按&nbsp;&nbsp;排&nbsp;&nbsp;序&nbsp;&nbsp;：
			<select name="i_OrderField">
				<option value="" <%=(event.getOrderField().equals("1"))?"selected":""%>>设置排序字段</option>
				
				<option value="MONEY_TYPE" <%=(event.getOrderField().equals("MONEY_TYPE"))?"selected":""%>>费用类别</option>
				
				<option value="MONEY" <%=(event.getOrderField().equals("MONEY"))?"selected":""%>>总金额</option>
				
				<option value="MONEY_DATE" <%=(event.getOrderField().equals("MONEY_DATE"))?"selected":""%>>费用发生日期</option>
			
			</select>
			&nbsp;&nbsp;
			<input type="radio" name="i_OrderDesc" value="false" <%=(event.isOrderDesc()==false)?"checked":""%> >升序
			<input type="radio" name="i_OrderDesc" value="true"  <%=(event.isOrderDesc()==true)?"checked":""%>  >降序
			<input type="button" value="查询" class="buttons" onclick="doSearch();return false;">&nbsp;<input type="button" value="清空" class="buttons" onclick="doClearEvent();return false;">
		</td>
	</tr>

<%=uiSearchEnd%>

<!--列表标题-->
<%=UIManager.addListHeadTitle("其他费用管理列表")%>

<!--********************* Part6:List Area ***************-->

<%=uiListStart%>>

<%@ include file="/framework/list_foot.jsp"%>

<%
	int index = 1 ;
%>	
	<%=uiListHeadTR%>>
		<%=UIManager.addListHeadCheckBox() %>

		<%=UIManager.addListHead("仓库名称",index++)%>

		<%=UIManager.addListHead("费用类别",index++)%>

		<%=UIManager.addListHead("总金额",index++,"num")%>

		<%=UIManager.addListHead("费用发生日期",index++)%>

		<%=UIManager.addListHead("创建人",index++)%>

		<%=UIManager.addListHead("创建时间",index++)%>
     
		<%=UIManager.addListHead("操作",-1)%>  
	<%=uiListHeadTREnd%>>
	
	<!--data-->
<%
	for(int i=0;i<list.size();i++)
	{
		BillMonthIo obj = (BillMonthIo)list.get(i);
%>
	<%=uiListDataTR[i%2]%> align=center>
    	<%=uiListDataTD%>>
    		<input type="checkbox" name="ids" value="<%=obj.getId()%>">
    	</td>

    	<%=uiListDataTD%>><%=obj.viewWarehouseName(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewMoneyType(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewMoney(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewMoneyDate(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewCreateUser(con)%></td>
    
    	<%=uiListDataTD%>><%=obj.viewCreateTime(con)%></td>
        

    	<%=uiListDataTD%>>
    		<a href="" onclick="bizViewBillMonthIo('<%=obj.getId()%>');return false;">浏览</a>
    	</td>
  	</tr>
<%	
	}
%>  

<%@ include file="/framework/list_foot2.jsp"%>

<%=uiListEnd%>


<!--********************* Part7:Action Area ***************-->
<%=uiCommandStart%>>
	<%=uiCommandTR%>>
		<%=uiCommandTD%>>
		<input type=button value="    添加   " class="buttons" onclick="doToAdd();return false;">
		<!--
		<input type=button value="    复制   " class="buttons" onclick="doToCopy();return false;">
		-->
		<input type=button value="    修改   " class="buttons" onclick="doToUpdate();return false;">
		<input type=button value="    删除   " class="buttons" onclick="doDelete();return false;">
		</td>
	</tr>	
<%=uiCommandEnd%>
</form>


<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :Arrow
	FileName  :/system/base/BillMonthIoList.jsp
-->
